﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace WPFSolution
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            var but = sender as Button;
            Window win = null;
            if (but != null)
            {
                switch(but.Content.ToString())
                {
                    case("Matrixs"):
                        win = new MatrixWindow();
                        break;
                    case("Interpolation"):
                        win = new InterpolationWindow();
                        break;
                    default:
                        win = new DifferentialEquationsWindow();
                        //MessageBox.Show("This Window isn't created yet. Sorry");
                        break;
                }
            }
            if (win != null)
            {
                Application.Current.MainWindow = win;
                win.Show();
                win.Activate();
                Close();
            }
                
        }
    }
}
